include config.mk
#SUBDIR is the folders at the Makefile same level.
#SUBDIR = src
SUBDIR := $(filter-out reference,$(SUBDIR))
# target

SUBTGT = all

.PHONY: all clean install distclean subdir $(SUBDIR)


all:install
	@echo \
	$(HR) "Every thing is OK!"

install:subdir
ifeq ($(strip $(INSTALL_TARGET)),)
	$(error INSTALL_TARGET not set! Please set in config.mk)
endif
	$(MAKE) $(SUBDIR) SUBTGT=$@

clean:
	$(MAKE) $(SUBDIR) SUBTGT=$@
	@echo \
	$(HR) "Clean finish!"

subdir:$(SUBDIR)
$(SUBDIR):
	$(MAKE) -C $@ $(SUBTGT)
